package com.andre2.springboot_02.controller;

import com.andre2.springboot_02.entity.LuceneGoods;
import com.andre2.springboot_02.entity.User;
import com.andre2.springboot_02.mapper.GoodDao;
import com.andre2.springboot_02.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * idea 第一次修改提交
 */
@RestController
public class GoodController {
    @Autowired
    private GoodDao goodDao;

    @RequestMapping("/goods")
    private List<LuceneGoods> findAll(){
        return goodDao.findAll();
    }

    @RequestMapping("/goods2")
    private LuceneGoods fingbyid(){
        return goodDao.findById(10).get();
    }
}
